﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace IService.Blog
{
    public interface IAboutService
    {
        #region Get

        /// <summary>
        /// 查询所有博主（分页）
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<PageInfoModel<BAbout>>> GetAllToPage(int offset, int limit);

        /// <summary>
        /// 查询所有博主
        /// </summary>
        public Task<MessageModel<List<BAbout>>> GetAll();

        /// <summary>
        /// 根据条件表达式查询数据列表
        /// </summary>
        /// <param name="whereExpression">条件表达式</param>
        /// <returns>数据列表</returns>
        public Task<MessageModel<List<BAbout>>> GetByExpression<BAbout>(Expression<Func<BAbout, bool>> whereExpression);


        /// <summary>
        /// 查询博主按ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<MessageModel<BAbout>> GetById(int id);
        #endregion

        #region Post
        /// <summary>
        /// 添加博主
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<string>> Post(BAbout parameter);

        #endregion

        #region Put
        /// <summary>
        /// 修改博主
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public Task<MessageModel<string>> Put(BAbout parameter);

        #endregion

        #region Delete
        /// <summary>
        /// 删除博主
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<MessageModel<bool>> DelById(int id);

        #endregion
    }
}
